package com.android.examplelist;

import java.util.ArrayList;
import java.util.HashMap;

import android.app.ListFragment;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.RelativeLayout;

public class CustomFragment extends Fragment {

	Button button;

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {

		return inflater.inflate(R.layout.custom_fragment, container,
				false);
	}

	@Override
	public void onViewCreated(View view, Bundle savedInstanceState) {
		super.onViewCreated(view, savedInstanceState);
		
		
		button = (Button) view.findViewById(R.id.info);


	}

	@Override
	public void onActivityCreated(Bundle savedInstanceState) {
		super.onActivityCreated(savedInstanceState);

		NewsEntityFragment.getData("http://www.baidu.com", this);
	}
	
    public void onStart1() {  
        System.out.println("onStart回调");  
        button.setVisibility(View.GONE); 
        
    }  
      
    public void onFinish1() {  
    	System.out.println("onFinish回调");
    	
    	 button.setVisibility(View.VISIBLE); 
    }

	public void onFailure1() {
		
		System.out.println("onFailure回调");  
		
	}

	
	public void onSuccess1(String data) {

		System.out.println(data);
		System.out.println("onSuccess成功");  
		button.setText("成功"); 
		
	}  



}
